<!-- HTML header for doxygen 1.8.3.1-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<title>Nordic Thingy:52 v2.2.0 : Thingy Environment Service</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="extra_stylesheet_offline.css" rel="stylesheet" type="text/css"/>
<link href="nordic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0" width="100%" class="blank">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Nordic Semiconductor" src="nordic_small.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">Nordic Thingy:52 v2.2.0
   </div>
  </td>
 </tr>
 </tbody>
</table>
<script>
var url=window.location.href.split("/").reverse()[1];
var validLinks= ["nrf5","s130","s132","s212","s332"];
var index;
for (index = 0; index < validLinks.length; ++index) {
   if ( url.indexOf(validLinks[index]) !== -1 ) {
      document.getElementById(validLinks[index]).setAttribute('class', 'doclinks docselected');
   };
};
</script>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__ble__sdk__srv__tes.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Thingy Environment Service<div class="ingroups"><a class="el" href="group__ble__sdk__srv.html">BLE services</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>Thingy Environment Service implementation.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structble__tes__init__t.html">ble_tes_init_t</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Thingy Environment Service initialization structure.  <a href="structble__tes__init__t.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structble__tes__s.html">ble_tes_s</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Thingy Environment Service structure.  <a href="structble__tes__s.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:gaf1cb0478a9d60bf219de42112859ec38"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__srv__tes.html#gaf1cb0478a9d60bf219de42112859ec38">BLE_TES_MAX_DATA_LEN</a>&#160;&#160;&#160;(BLE_GATT_ATT_MTU_DEFAULT - 3)</td></tr>
<tr class="separator:gaf1cb0478a9d60bf219de42112859ec38"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga74382e889100cb1e74c3681bd010724c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__srv__tes.html#ga74382e889100cb1e74c3681bd010724c">BLE_UUID_TES_SERVICE</a>&#160;&#160;&#160;0x0200</td></tr>
<tr class="separator:ga74382e889100cb1e74c3681bd010724c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ga42620ff30ed437965e30197414292f23"><td class="memItemLeft" align="right" valign="top"><a id="ga42620ff30ed437965e30197414292f23"></a>
typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__srv__tes.html#ga42620ff30ed437965e30197414292f23">ble_tes_evt_handler_t</a>) (<a class="el" href="structble__tes__s.html">ble_tes_t</a> *p_tes, ble_tes_evt_type_t evt_type, uint8_t *p_data, uint16_t length)</td></tr>
<tr class="memdesc:ga42620ff30ed437965e30197414292f23"><td class="mdescLeft">&#160;</td><td class="mdescRight">Thingy Environment Service event handler type. <br /></td></tr>
<tr class="separator:ga42620ff30ed437965e30197414292f23"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga96aa8f21018b192f8bb854859530bafe"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__srv__tes.html#ga96aa8f21018b192f8bb854859530bafe">ble_tes_color_set</a> (<a class="el" href="structble__tes__s.html">ble_tes_t</a> *p_tes, ble_tes_color_t *p_data)</td></tr>
<tr class="memdesc:ga96aa8f21018b192f8bb854859530bafe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function for setting the color data.  <a href="#ga96aa8f21018b192f8bb854859530bafe">More...</a><br /></td></tr>
<tr class="separator:ga96aa8f21018b192f8bb854859530bafe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3d1629990a842eca0c6c96872eca7231"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__srv__tes.html#ga3d1629990a842eca0c6c96872eca7231">ble_tes_gas_set</a> (<a class="el" href="structble__tes__s.html">ble_tes_t</a> *p_tes, ble_tes_gas_t *p_data)</td></tr>
<tr class="memdesc:ga3d1629990a842eca0c6c96872eca7231"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function for setting the gas data.  <a href="#ga3d1629990a842eca0c6c96872eca7231">More...</a><br /></td></tr>
<tr class="separator:ga3d1629990a842eca0c6c96872eca7231"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga214c30d7b0f07f264ef3e2ceb0b10f47"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__srv__tes.html#ga214c30d7b0f07f264ef3e2ceb0b10f47">ble_tes_humidity_set</a> (<a class="el" href="structble__tes__s.html">ble_tes_t</a> *p_tes, ble_tes_humidity_t *p_data)</td></tr>
<tr class="memdesc:ga214c30d7b0f07f264ef3e2ceb0b10f47"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function for setting the humidity.  <a href="#ga214c30d7b0f07f264ef3e2ceb0b10f47">More...</a><br /></td></tr>
<tr class="separator:ga214c30d7b0f07f264ef3e2ceb0b10f47"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6091b836154596e1478a21404f13ff2c"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__srv__tes.html#ga6091b836154596e1478a21404f13ff2c">ble_tes_init</a> (<a class="el" href="structble__tes__s.html">ble_tes_t</a> *p_tes, const <a class="el" href="structble__tes__init__t.html">ble_tes_init_t</a> *p_tes_init)</td></tr>
<tr class="memdesc:ga6091b836154596e1478a21404f13ff2c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function for initializing the Thingy Environment Service.  <a href="#ga6091b836154596e1478a21404f13ff2c">More...</a><br /></td></tr>
<tr class="separator:ga6091b836154596e1478a21404f13ff2c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga144e7065b310a35fcab8c3f2d94375d2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__srv__tes.html#ga144e7065b310a35fcab8c3f2d94375d2">ble_tes_on_ble_evt</a> (<a class="el" href="structble__tes__s.html">ble_tes_t</a> *p_tes, ble_evt_t *p_ble_evt)</td></tr>
<tr class="memdesc:ga144e7065b310a35fcab8c3f2d94375d2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function for handling the Thingy Environment Service's BLE events.  <a href="#ga144e7065b310a35fcab8c3f2d94375d2">More...</a><br /></td></tr>
<tr class="separator:ga144e7065b310a35fcab8c3f2d94375d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga38d41753614fed2e730169d00d6edbb3"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__srv__tes.html#ga38d41753614fed2e730169d00d6edbb3">ble_tes_pressure_set</a> (<a class="el" href="structble__tes__s.html">ble_tes_t</a> *p_tes, ble_tes_pressure_t *p_data)</td></tr>
<tr class="memdesc:ga38d41753614fed2e730169d00d6edbb3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function for setting the pressure.  <a href="#ga38d41753614fed2e730169d00d6edbb3">More...</a><br /></td></tr>
<tr class="separator:ga38d41753614fed2e730169d00d6edbb3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga80bf34aaf088ad2437ba5b1fbea368b9"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__srv__tes.html#ga80bf34aaf088ad2437ba5b1fbea368b9">ble_tes_temperature_set</a> (<a class="el" href="structble__tes__s.html">ble_tes_t</a> *p_tes, ble_tes_temperature_t *p_data)</td></tr>
<tr class="memdesc:ga80bf34aaf088ad2437ba5b1fbea368b9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function for setting the temperature.  <a href="#ga80bf34aaf088ad2437ba5b1fbea368b9">More...</a><br /></td></tr>
<tr class="separator:ga80bf34aaf088ad2437ba5b1fbea368b9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>Thingy Environment Service implementation. </p>
<p>The Thingy Environment Service is a simple GATT-based service with multiple characteristics for reading sensor data and configuring the sensors.</p>
<dl class="section note"><dt>Note</dt><dd>The application must propagate S110 SoftDevice events to the Thingy Environment Service module by calling the <a class="el" href="group__ble__sdk__srv__tes.html#ga144e7065b310a35fcab8c3f2d94375d2" title="Function for handling the Thingy Environment Service&#39;s BLE events. ">ble_tes_on_ble_evt()</a> function from the ble_stack_handler callback. </dd></dl>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="gaf1cb0478a9d60bf219de42112859ec38"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf1cb0478a9d60bf219de42112859ec38">&#9670;&nbsp;</a></span>BLE_TES_MAX_DATA_LEN</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define BLE_TES_MAX_DATA_LEN&#160;&#160;&#160;(BLE_GATT_ATT_MTU_DEFAULT - 3)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Maximum length of data (in bytes) that can be transmitted to the peer by the Thingy Environment service module. </p>

</div>
</div>
<a id="ga74382e889100cb1e74c3681bd010724c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga74382e889100cb1e74c3681bd010724c">&#9670;&nbsp;</a></span>BLE_UUID_TES_SERVICE</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define BLE_UUID_TES_SERVICE&#160;&#160;&#160;0x0200</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The UUID of the Thingy Environment Service. </p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga96aa8f21018b192f8bb854859530bafe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga96aa8f21018b192f8bb854859530bafe">&#9670;&nbsp;</a></span>ble_tes_color_set()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ble_tes_color_set </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structble__tes__s.html">ble_tes_t</a> *&#160;</td>
          <td class="paramname"><em>p_tes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ble_tes_color_t *&#160;</td>
          <td class="paramname"><em>p_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function for setting the color data. </p>
<p>This function sends the input humidity as an humidity characteristic notification to the peer.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">p_tes</td><td>Pointer to the Thingy Environment Service structure. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">p_data</td><td>Pointer to the humidity data.</td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">NRF_SUCCESS</td><td>If the string was sent successfully. Otherwise, an error code is returned. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga3d1629990a842eca0c6c96872eca7231"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3d1629990a842eca0c6c96872eca7231">&#9670;&nbsp;</a></span>ble_tes_gas_set()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ble_tes_gas_set </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structble__tes__s.html">ble_tes_t</a> *&#160;</td>
          <td class="paramname"><em>p_tes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ble_tes_gas_t *&#160;</td>
          <td class="paramname"><em>p_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function for setting the gas data. </p>
<p>This function sends the input humidity as an humidity characteristic notification to the peer.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">p_tes</td><td>Pointer to the Thingy Environment Service structure. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">p_data</td><td>Pointer to the humidity data.</td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">NRF_SUCCESS</td><td>If the string was sent successfully. Otherwise, an error code is returned. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga214c30d7b0f07f264ef3e2ceb0b10f47"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga214c30d7b0f07f264ef3e2ceb0b10f47">&#9670;&nbsp;</a></span>ble_tes_humidity_set()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ble_tes_humidity_set </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structble__tes__s.html">ble_tes_t</a> *&#160;</td>
          <td class="paramname"><em>p_tes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ble_tes_humidity_t *&#160;</td>
          <td class="paramname"><em>p_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function for setting the humidity. </p>
<p>This function sends the input humidity as an humidity characteristic notification to the peer.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">p_tes</td><td>Pointer to the Thingy Environment Service structure. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">p_data</td><td>Pointer to the humidity data.</td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">NRF_SUCCESS</td><td>If the string was sent successfully. Otherwise, an error code is returned. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga6091b836154596e1478a21404f13ff2c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga6091b836154596e1478a21404f13ff2c">&#9670;&nbsp;</a></span>ble_tes_init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ble_tes_init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structble__tes__s.html">ble_tes_t</a> *&#160;</td>
          <td class="paramname"><em>p_tes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structble__tes__init__t.html">ble_tes_init_t</a> *&#160;</td>
          <td class="paramname"><em>p_tes_init</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function for initializing the Thingy Environment Service. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">p_tes</td><td>Thingy Environment Service structure. This structure must be supplied by the application. It is initialized by this function and will later be used to identify this particular service instance. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">p_tes_init</td><td>Information needed to initialize the service.</td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">NRF_SUCCESS</td><td>If the service was successfully initialized. Otherwise, an error code is returned. </td></tr>
    <tr><td class="paramname">NRF_ERROR_NULL</td><td>If either of the pointers p_tes or p_tes_init is NULL. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga144e7065b310a35fcab8c3f2d94375d2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga144e7065b310a35fcab8c3f2d94375d2">&#9670;&nbsp;</a></span>ble_tes_on_ble_evt()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ble_tes_on_ble_evt </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structble__tes__s.html">ble_tes_t</a> *&#160;</td>
          <td class="paramname"><em>p_tes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ble_evt_t *&#160;</td>
          <td class="paramname"><em>p_ble_evt</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function for handling the Thingy Environment Service's BLE events. </p>
<p>The Thingy Environment Service expects the application to call this function each time an event is received from the S110 SoftDevice. This function processes the event if it is relevant and calls the Thingy Environment Service event handler of the application if necessary.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">p_tes</td><td>Thingy Environment Service structure. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">p_ble_evt</td><td>Event received from the S110 SoftDevice. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga38d41753614fed2e730169d00d6edbb3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga38d41753614fed2e730169d00d6edbb3">&#9670;&nbsp;</a></span>ble_tes_pressure_set()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ble_tes_pressure_set </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structble__tes__s.html">ble_tes_t</a> *&#160;</td>
          <td class="paramname"><em>p_tes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ble_tes_pressure_t *&#160;</td>
          <td class="paramname"><em>p_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function for setting the pressure. </p>
<p>This function sends the input pressure as an pressure characteristic notification to the peer.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">p_tes</td><td>Pointer to the Thingy Environment Service structure. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">p_data</td><td>Pointer to the pressure data.</td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">NRF_SUCCESS</td><td>If the string was sent successfully. Otherwise, an error code is returned. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga80bf34aaf088ad2437ba5b1fbea368b9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga80bf34aaf088ad2437ba5b1fbea368b9">&#9670;&nbsp;</a></span>ble_tes_temperature_set()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ble_tes_temperature_set </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structble__tes__s.html">ble_tes_t</a> *&#160;</td>
          <td class="paramname"><em>p_tes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ble_tes_temperature_t *&#160;</td>
          <td class="paramname"><em>p_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function for setting the temperature. </p>
<p>This function sends the input temperature as an temperature characteristic notification to the peer.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">p_tes</td><td>Pointer to the Thingy Environment Service structure. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">p_data</td><td>Pointer to the temperature data.</td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">NRF_SUCCESS</td><td>If the string was sent successfully. Otherwise, an error code is returned. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="topicfooter">
<a href="mailto:docfeedback@nordicsemi.no?subject=Documentation%20feedback" id="maillink">Documentation feedback</a> | <a href="https://devzone.nordicsemi.com/questions/" target="_blank">Developer Zone</a> | <a href="http://response.nordicsemi.com/subscribe-to-our-newsletters" target="_blank">Subscribe</a> | Updated <span id="date"/>
<script>
var date = new Date("Thu Feb 7 2019" + " UTC");
document.getElementById("date").innerHTML = date.toJSON().slice(0, 10);
var url=window.location.href.split("?")[0];
var filename=url.substring(url.lastIndexOf('/')+1);
document.getElementById("maillink").href = "mailto:docfeedback@nordicsemi.no?subject=Documentation%20feedback"+decodeURIComponent("%26")+"body=File%20name%3A%20"+encodeURIComponent(filename);
</script>
</div>
</body>
</html>
